<template>
    <div class="xj-details">
        <section class="bodyList">
            <div class="list" v-for="item in list" :key="item.value" @click="goTask(item.siteId)">
                <div class="flex">
                    <div style="flex:0 0 10%">
                        <i class="iconfont icon-yk_yuanquan_fill" style="color:#00ff80;"></i>
                    </div>
                    <div style="flex:0 0 85%">
                        {{item.siteName}}
                    </div>
                    <div style="flex:0 0 5%">
                        <i class="iconfont icon-jiantou-copy"></i>
                    </div>
                </div>

            </div>
        </section>
    </div>
</template>

<script>
export default {
    data() {
        return {
            list: []
        }
    },
    mounted() {
        this.getDetailsList()
    },
    methods: {
        goTask(siteId) {
            this.$router.push({ path: 'task', query: { id: this.$route.query.id, siteId: siteId } })
        },
        //获取列表
        getDetailsList() {
            this.$api.xunjian.itaskdetail({
                id: this.$route.query.id
            }).then(res => {
                if (res.success) {
                    this.list = res.data
                }
            })
        }
    }
}
</script>

<style>
</style>
